package com.yunfei.web;

import com.yunfei.bo.FundFeneSureBook;
import com.yunfei.service.SchedualServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: zntg_clould_v1
 * @description:在Web层的controller层，对外暴露一个”/hi”的API接口，通过上面定义的Feign客户端SchedualServiceHi 来消费服务。代码如下：
 * @author: zhengyunfei
 * @create: 2018-07-03 11:08
 **/
@RestController
public class HiController {
    @Autowired
    SchedualServiceHi schedualServiceHi;
    /**
    * @Description: sayHi api接口
    * @Author: zhengyunfei qq群号:541122375
    * @Date: 2018/7/3
    * @time:11:09
    */
    @RequestMapping(value = "/hi2",method = RequestMethod.GET)
    @ResponseBody
    public String sayHi(@RequestParam String jsonData){
        String result=schedualServiceHi.sayHiFromClientOne(jsonData);
        return result;
    }
    @RequestMapping(value = "/createSign",method = RequestMethod.POST)
    @ResponseBody
    public Object create(@RequestParam(value="jsonData",required = true) String jsonData){
        try{
            String result=schedualServiceHi.sayHiFromClientOne(jsonData);
            return result;
            //fundFeneSureBook.setFileSize("99");
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
